﻿<div class="all-elements">
    <div id="sidebar" class="page-sidebar">
        <div class="page-sidebar-scroll">
            <div class="nav-item selected-nav-item" data-ng-repeat="r in roleByGroup">
                <a href="#/{{r.RoleValue}}">
                    <div class="icon-nav {{r.RoleValue}}"></div>
                    {{r.RoleName}}
                </a>
            </div>
            <div class="nav-item">
                <a href="#">
                    <div class="icon-nav icon-share" onclick="logout()"></div>
                    THOÁT
                </a>
                <script>
                    function logout() {
                        localStorage.removeItem("idkey");
                        localStorage.removeItem("authen");
                        localStorage.removeItem("menu");
                        $location.path('/login/');
                    }
                </script>
            </div>
        </div>
    </div>



    <div id="content" class="page-content">
        <div class="page-header">
            <p class="logo">
            </p>
            <a href="#" class="deploy-sidebar"></a>
            <div class="user">
                <span class="name">{{userName}}</span>
                <div class="notifi">
                    <span class="noti-chart" ng-show="countNewMessage>0"><a href="#/newMessage">{{countNewMessage}}</a></span>
                    <span class="noti-friend" ng-show="countAddFriend>0"><a href="#/newFriend">{{countAddFriend}}</a></span>
                    <span class="noti-fromroom" ng-show="countFromRoom>0"><a href="#/newFromRoom">{{countFromRoom}}</a></span>
                </div>
            </div>
        </div>
        <form>
            <div class="page-content-wrapper">
                <div class="container no-bottom">
                    <div class="heading">
                        <div class="heading-left">
                            <h3>{{title}}</h3>
                        </div>

                    </div>
                </div>

                <div class="decoration"></div>
                <div class="page-content-wrapper">
                    <h4>upload hình ảnh</h4>
                    <div ng-click="selectPicture()">
					<span class="icon-upload-big icon-inline"></span>
                    </div>
                    <div class="images">
                        <span id="img_{{img.Id}}" ng-repeat="img in listImage" class="image-item-wapper">
                            <img class="image-item" ng-src="{{severFile}}lesson/{{img.PictureUrl}}" />
                            <span class="icon-remove-sign-3 icon-inline blue-icon picture-del" ng-click="delImage(img.PictureUrl)"></span>
                        </span>
                        <span id="imagesAdd"></span>
                    </div>
                    <div class="decoration"></div>
                    <div id="lesson-content">
                        <input type="hidden" name="{{lessonResponse.data}}"></input>
                        <h4>Bài học thứ(*)</h4>
                        <input type="number" ng-model="lessonData.LessonNumber" class="requered" required />
                        <h4>Tên bài học(*)</h4>
                        <input type="text" ng-model="lessonData.Name" class="requered" required />
                        <h4>mô tả ngắn</h4>
                        <textarea ng-model="lessonData.Description" style="width: 100%;height:60px;"></textarea>
                        <h4>nội dung bài học</h4>
                        <textarea ng-model="lessonData.LessonContent" style="width: 100%;height:100px;"></textarea>
                        <div class="decoration"></div>

                    </div>
                    <h4>Từ khóa</h4>
                    <div>
                        <textarea class="full ng-pristine ng-valid" id="tag-new" placeholder="Ví dụ: từ vựng;thời tiết;" />
                    </div>
                    <div class="decoration"></div>
                    <div class="post-details">
                        <a class="posted-tag" data-ng-repeat="t in tags" ng-click="deleteTag(t.Id)"><span>{{t.TagName}}</span></a>
                        <div class="clear"></div>
                    </div>
                    <h4 id="word-header" ng-click="addItemListWord()"><span class="float-left">từ vựng</span><span class="icon-add-1 icon-inline float-left"></span></h4>
                    <div id="word-add" class="full">
                        <div class="word-item" data-ng-repeat="l in listWord" style="height:auto;">
                            <span>WordName:</span><span class="delete-item-word" ng-click="deleteItem($index,l.Id)"></span>
                            <input class="WordName" value="{{l.WordName}}" ng-model="l.WordName" type="text" />
                            <span>Type:</span><input class="Type" value="{{l.Type}}" ng-model="l.Type" type="text" />
                            <span>Meaning:</span><input class="Meaning" value="{{l.Meaning}}" ng-model="l.Meaning" type="text" />
                            <span>Pronounce:</span><input class="Pronounce" value="{{l.Pronounce}}" ng-model="l.Pronounce" type="text" />
                        </div>
                    </div>
                    <div ng-show="errorStatus" class="error">Xảy ra lỗi!</div>
                    <div ng-show="successStatus" class="success">Thành công!</div>
                </div>
            </div>
            <div class="footer">
                <div class="footer-shortcuts">
                    <div>
                        <a href="#/lessonManage">
                            <span class="button-bottom icon-back-room"></span><span class="button-text">Quay về</span>
                        </a>
                    </div>
                    <div ng-show="addLesson">
                        <a href="javascript:void(0)" ng-click="addLessonClick()">
                            <span class="button-text">Đăng bài</span><span class="button-bottom icon-next-lesson"></span>
                        </a>
                    </div>
                    <div ng-show="updateLesson">
                        <a href="javascript:void(0)" ng-click="updateLessonClick()">
                            <span class="button-bottom icon-next-lesson"></span><span class="button-text">Cập nhật</span>
                        </a>
                    </div>
                </div>
            </div>
        </form>
    </div>
</div>
